<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html">
    <h:form>
        <h:outputText style="font-weight: bold" value="Days Valid:" />
        <h:inputText id="daysValid" value="#{quotationBean.daysValid}">
        </h:inputText>
        <br/>
        <h:outputText style="font-weight: bold" value="Status:" />
        <h:inputText id="status" value="#{quotationBean.status}">
        </h:inputText>


        <br/>
        <h:commandButton action="editQuotationItem.xhtml" value="Edit Quotation Items" actionListener="#{quotationBean.getItems}"/>
        <br/>
        <h:commandButton action="result.xhtml" value="Save Quotation" actionListener="#{quotationBean.editQuotation}"/>
        <br/> <br/>
        <h:outputText style="font-weight: bold" value="List of quotations items:" />
        <h:dataTable cellpadding="5px" cellspacing="18px" styleClass="allaroundborder" headerClass="allaroundborder" columnClasses="allaroundborder"
                     rowClasses="allaroundborder" value="#{quotationBean.quotationItems}" var="quotationItem">

            <h:column>
                <f:facet name="header">
                    <h:outputText value="Item Id" />
                </f:facet>
                <h:outputText value="#{quotationItem.id}" />
            </h:column>

            <h:column>
                <f:facet name="header">
                    <h:outputText value="Item Name" />
                </f:facet>
                <h:outputText value="#{quotationItem.productName}" />
            </h:column>

            <h:column>
                <f:facet name="header">
                    <h:outputText value="Quantity of Product" />
                </f:facet>
                <h:outputText value="#{quotationItem.numOfProduct}" />
            </h:column>

            <h:column>
                <f:facet name="header">
                    <h:outputText value="Product Price" />
                </f:facet>
                <h:outputText value="#{quotationItem.productPrice}" />
            </h:column>
        </h:dataTable>
    </h:form>
</ui:composition>
